Page({

  /**
   * 页面的初始数据
   */
  data: {
    sch_listData: [],
    new_listData:  [{ "name": "张山试试", "job": "打工1", "account": "11110000000000", "oper": "随便"},{ "name": "上午", "job": "打工1", "account": "11110000000000", "oper": "随便"},
    {"name": "上午", "job": "打工1", "account": "11110000000000", "oper": "随便"}, { "name": "上午", "job": "打工1", "account": "11110000000000", "oper": "随便"}],
    dateArray: [],
    headerList: ['姓名','岗位','账号','操作'],
    nameList: ['张三','李四','王五','王五'],
    jobList: ['开发','测试','运维','王五'],
    countList: ['111111','222222','333333','王五'],
    operList: ['写字','入手','键盘','王五']
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    wx.setNavigationBarTitle({
      title: '清单制管理基础建设',
    })
  },

  clickDoctor: function (e) {
    var $dict = e.currentTarget.dataset;

    var tag = $dict.dayofweek;//周几
    var appdate = '';
    for (var k = 0; k < weeksArray.length; k++) {
      if (weeksArray[k].weekNum == tag - 1) {
        appdate = weeksArray[k].date_text;
      }
    }
    var dd = new Date();
    appdate = dd.getFullYear() + '/' + appdate;


    var str = '';
    var timeStr = $dict.timeperiod;
    if (timeStr=="A"){
      timeStr = '上午';
    } else if (timeStr=="B"){
      timeStr = '下午';
    }else{
      timeStr = '晚上';
    }


    str = appdate + ' ' + timeStr + ' '+$dict.docname;
    wx.showModal({
      title: '提示',
      content: str,
      success: function (res) {
        if (res.confirm) {
          console.log('用户点击确定')
        }
      }
    })
  },
})
